Imports System.ComponentModel

<Serializable()> _
Public Class Section8
    Inherits BaseDescriptor

    <Serializable(), TypeConverter(GetType(CustomExpandableObjectConverter))> _
    Public Class SectionVFOL
        Inherits BaseDescriptor

        Private _LAMBDA As Double
        Private _N_EFOL As Double
        Private _K_EFOL As Double
        Private _N_IFOL As Double
        Private _K_IFOL As Double

        <Browsable(False)> _
        Public Property LAMBDA() As Double
            Get
                Return _LAMBDA
            End Get
            Set(ByVal value As Double)
                _LAMBDA = value
            End Set
        End Property

        <CustomOrder(1), CustomDisplayName("N_EFOL"), CustomDescription("N_EFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property N_EFOL() As Double
            Get
                Return _N_EFOL
            End Get
            Set(ByVal value As Double)
                _N_EFOL = value
            End Set
        End Property

        <CustomOrder(2), CustomDisplayName("K_EFOL"), CustomDescription("K_EFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property K_EFOL() As Double
            Get
                Return _K_EFOL
            End Get
            Set(ByVal value As Double)
                _K_EFOL = value
            End Set
        End Property

        <CustomOrder(3), CustomDisplayName("N_IFOL"), CustomDescription("N_IFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property N_IFOL() As Double
            Get
                Return _N_IFOL
            End Get
            Set(ByVal value As Double)
                _N_IFOL = value
            End Set
        End Property

        <CustomOrder(4), CustomDisplayName("K_IFOL"), CustomDescription("K_IFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
        Public Property K_IFOL() As Double
            Get
                Return _K_IFOL
            End Get
            Set(ByVal value As Double)
                _K_IFOL = value
            End Set
        End Property

    End Class

    'S8C
    Private _W_EFOL As Double
    Private _W_IFOL As Double

    '0.9.4
    'Private _LICOH_EFOL As Integer
    'Private _LICOH_IFOL As Integer

    Private _VFOL As New List(Of SectionVFOL)

    <CustomOrder(1), CustomCategory("S8C"), CustomDisplayName("W_EFOL"), CustomDescription("W_EFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
    Public Property W_EFOL() As Double
        Get
            Return _W_EFOL
        End Get
        Set(ByVal value As Double)
            _W_EFOL = value
        End Set
    End Property

    <CustomOrder(2), CustomCategory("S8C"), CustomDisplayName("W_IFOL"), CustomDescription("W_IFOL"), DefaultValue(0.0), TypeConverter(GetType(CustomDoubleConverter))> _
    Public Property W_IFOL() As Double
        Get
            Return _W_IFOL
        End Get
        Set(ByVal value As Double)
            _W_IFOL = value
        End Set
    End Property

    '0.9.4
    '<CustomOrder(3), CustomCategory("S8C"), CustomDisplayName("LICOH_EFOL"), CustomDescription("LICOH_EFOL"), DefaultValue(0), TypeConverter(GetType(CustomInt32ConverterLICOH))> _
    'Public Property LICOH_EFOL() As Object
    '    Get
    '        Return _LICOH_EFOL
    '    End Get
    '    Set(ByVal value As Object)
    '        _LICOH_EFOL = CInt((New CustomInt32ConverterLICOH).ConvertFrom(value))
    '    End Set
    'End Property

    '0.9.4
    '<CustomOrder(4), CustomCategory("S8C"), CustomDisplayName("LICOH_IFOL"), CustomDescription("LICOH_IFOL"), DefaultValue(0), TypeConverter(GetType(CustomInt32ConverterLICOH))> _
    'Public Property LICOH_IFOL() As Object
    '    Get
    '        Return _LICOH_IFOL
    '    End Get
    '    Set(ByVal value As Object)
    '        _LICOH_IFOL = CInt((New CustomInt32ConverterLICOH).ConvertFrom(value))
    '    End Set
    'End Property

    <CustomOrder(5), CustomCategory("S8C"), CustomDisplayName("VFOL"), CustomDescription("VFOL"), TypeConverter(GetType(CustomArrayConverter)), [ReadOnly](True)> _
    Public Property VFOL() As SectionVFOL()
        Get
            Return Me.Items.ToArray
        End Get
        Set(ByVal value As SectionVFOL())
            Me.Items.Clear()
            For Each objSectionVFOL As SectionVFOL In value
                Me.Items.Add(objSectionVFOL)
            Next
        End Set
    End Property

    <Browsable(False)> _
    Public ReadOnly Property Items() As List(Of SectionVFOL)
        Get
            Return _VFOL
        End Get
    End Property

End Class
